package cn.hwua.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class BaseServlet {
    public static String getPath(HttpServletRequest req, HttpServletResponse resp){
        String baseURL=req.getContextPath();//获取项目的基本路径
        String uri=req.getRequestURI();
        String path=uri.substring(uri.lastIndexOf("/")+1);
        return path;
    }
}
